package cn.com.yiqi.wsc.dao.lottery;

import cn.com.artemis.framework.base.commons.persistence.CrudDao;
import cn.com.yiqi.wsc.entity.lottery.LotteryItems;
import cn.com.yiqi.wsc.entity.lottery.LotteryItemsDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 何刚
 * @version V1.0
 * @Title: LotteryItemsDao
 * @Package cn.com.yiqi.wsc.dao.lottery
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @date 2017/3/22
 */
@Repository
public interface LotteryItemsDao extends CrudDao<LotteryItems> {


    /**
     * 根据活动ID获取奖品信息
     *
     * @param activityId
     * @return
     */
    List<LotteryItemsDTO> getItemByActivityId(@Param("activityId") Integer activityId);

    /**
     * 根据活动Id获取奖项Id
     *
     * @param activityId
     * @return
     */
    List<Integer> selectItemIdByActivityId(@Param("activityId") Integer activityId);

    /**
     * 批量删除根据活动ID
     *
     * @param activityId
     * @return
     */
    Integer deleteBatch(@Param("activityId") Integer activityId);

    /**
     * 批量添加
     *
     * @param lotteryItems
     * @return
     */
    Integer batchInsert(@Param("items") List<LotteryItemsDTO> lotteryItems);

}
